<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateReservationOperateLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('reservation_operate_logs', function (Blueprint $table) {
            $table ->increments('id') ->comment('预约评论点赞记录表');
            $table ->integer('reservation_id') ->default('0') ->comment('预约文章ID');
            $table ->tinyInteger('operate_type') ->default('0') ->comment('操作类型（1:点赞；2分享；3关注；4评论）');
            $table ->integer('obj_id') ->default('0') ->comment('目标id');
            $table ->integer('user_id') ->default('0') ->comment('操作员ID');
            $table ->timestamps();
            $table ->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('reservation_operate_logs', function (Blueprint $table) {
            //
        });
    }
}
